package homework;

import java.util.Scanner;

public class Demo3 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.print("请输入一个成绩:");
        double score = scan.nextDouble();
        if(score<0||score>100){
            System.out.println("成绩不合法");
        }else if(score>=90){
            System.out.println("A-优秀");
        } else if (score>=80) {
            System.out.println("B-良好");
        } else if (score>=60) {
            System.out.println("C-中等");
        }else {
            System.out.println("D-不及格");
        }


    }
}
